package com.king.pojo.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.king.constant.ResponseStatus;
import lombok.Data;

/**
 * @author liukai
 */
@Data
public class AjaxResult {

    private Integer status;

    private String message;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Object data;


    public AjaxResult(ResponseStatus responseStatus, Object data) {
        this.status = responseStatus.getStatus();
        this.message = responseStatus.getMessage();
        this.data = data;
    }

    public AjaxResult(ResponseStatus responseStatus) {
        this.status = responseStatus.getStatus();
        this.message = responseStatus.getMessage();
    }

}
